<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var o = {
        x:10,
        y:20
    }

    var o = function(m){
        if (typeof m != 'object'){
            var m = {}
        }
        console.log(m);
        m.say = function(){
            console.log(m.x)
        }
        return m;
    }(o)


    var o = function(moudle){
        moudle.say2 = function(){
            console.log(moudle.y);
        }
        return moudle
    }(o)

    /*
    var o = function(o){
        var o = o||{}
        o.say = function () {
            console.log(x)
        }
        return o;
    }(o);
    */



</script>
</body>
</html>